package day13.KeJian;

import java.io.FileWriter;
import java.io.IOException;

public class Tset01 {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("D://itheima//nb.txt");
        fw.write(12);
        //void   write(char[] cbuf)写入一个字符数组
        char[] cha = {10,15,20,30};
        fw.write(cha);
        //void write(char[] cbuf, int off, int len)：写入字符数组的一部分
        //fw.write(cha,0,cha,length);
        fw.write(cha,2,2);
        ////void write(String str)：写一个字符串
        String zx = "123黑马";
        fw.write(zx);
        // //void write(String str, int off, int len)：写一个字符串的一部分
        fw.write(zx,0,2);
        //释放资源
        fw.close();
    }
}
